package com.yobol.jgrowth.service.impl;

import com.yobol.jgrowth.domain.ArticleComment;
import com.yobol.jgrowth.mapper.ArticleCommentMapper;
import com.yobol.jgrowth.service.ArticleCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Implement article service comment interface
 *
 * @author yobol
 * @create 2018-04-05 20:22
 **/

@Service
public class ArticleCommentServiceImpl implements ArticleCommentService {

    @Autowired
    private ArticleCommentMapper articleCommentMapper;

    @Override
    public List<ArticleComment> getArticleCommentsByAid(int aid) {
        return articleCommentMapper.getArticleCommentsByAid(aid);
    }

    @Override
    public int insert(ArticleComment comment) {
        return articleCommentMapper.insert(comment);
    }

    @Override
    public int deleteArticleCommentsByAid(int aid) {
        return articleCommentMapper.deleteArticleCommentsByAid(aid);
    }
}
